package com.sys.system.version.webservice;

import java.net.MalformedURLException;

import org.codehaus.xfire.XFireFactory;
import org.codehaus.xfire.client.XFireProxyFactory;
import org.codehaus.xfire.service.Service;
import org.codehaus.xfire.service.binding.ObjectServiceFactory;

import com.portal.framework.dao.ParameterCatch;
import com.sys.system.version.dto.VersionDTO;
		
public class VersionDataService {

	public static VersionWebService getSrvc(){
		String webUrl="http://192.168.70.31/servicesys/services/VersionWebService";
//		String webUrl=ParameterCatch.parameterMap.get("sysDataService")+"/VersionWebService";
		VersionWebService srvc=null;
		Service srvcModel = new ObjectServiceFactory().create(VersionWebService.class);
		XFireProxyFactory factory = new XFireProxyFactory(XFireFactory.newInstance().getXFire());
		try{
		srvc=(VersionWebService) factory.create(srvcModel,webUrl);
		}catch(MalformedURLException e){
			e.printStackTrace();
		}
		return srvc;
	}
	

	/**
	 * 查询系统最新版本信息
	 * 方法名:   findVersion   
	 * 方法描述: TODO
	 * 传入参数:  
	 * 返回值类型: VersionDTO
	 * 异常对象:
	 */
	public static VersionDTO findTopVersion(){
		return getSrvc().findTopVersion();
	}
	
}

		